import 'package:backend.purchases/domain/entities/app_store_api/app_store_api_access_token.dart';
import 'package:backend.purchases/domain/services/app_store_api_access_token_service/service.dart';

abstract class IssueAppStoreApiAccessToken {
  Future<AppStoreApiAccessToken> call();
}

class IssueAppStoreApiAccessTokenImpl implements IssueAppStoreApiAccessToken {
  const IssueAppStoreApiAccessTokenImpl({
    required AppStoreApiAccessTokenService accessTokenService,
  }) : _accessTokenService = accessTokenService;

  final AppStoreApiAccessTokenService _accessTokenService;

  @override
  Future<AppStoreApiAccessToken> call() {
    return _accessTokenService.issueAccessToken();
  }
}
